#pragma once
#include <string>
#include <list>
#ifdef CAMERA_CAPTURE_IMPL_EXPORTS 
#define CAMERA_CAPTURE_IMPL_API __declspec(dllexport) 
#else 
#define CAMERA_CAPTURE_IMPL_API __declspec(dllimport) 
#endif 

struct  IGraphBuilder;
struct  ICaptureGraphBuilder2;
struct  IMediaControl;
struct  IBaseFilter;
struct IMediaSample;

struct   MediaOutputInfo;
class   CaptureFilter;
class   CameraSaveTask;
class   CameraCaptureIterface;

class CAMERA_CAPTURE_IMPL_API CameraCaptureImpl
{
public:
	CameraCaptureImpl();
	virtual ~CameraCaptureImpl();
public:
	int  get_camera_list(std::list<std::string> &);
	int  get_camera_info_list(const std::string &, std::list<std::string> &);
public:
	bool Init(const std::string &name, const std::string &info);
	bool UnInit();
	bool Start(CameraCaptureIterface *handle);
	bool Stop();
public:
	int		Width();
	int		Hight();
public:
	void  ReceiveMultiple(IMediaSample *sample);
private:
	IGraphBuilder           *graph;
	ICaptureGraphBuilder2   *capture;
	IMediaControl           *control;

	IBaseFilter             *deviceFilter;
	CaptureFilter           *captureFilter;
	MediaOutputInfo			*m_pOutputInfo;
	CameraCaptureIterface   *m_pCameraCaptureIterface;
};

